<template>
  <a-tabs v-model="tabIndex" default-active-key="1" @change="callback">
    <a-tab-pane key="1" tab="待培训">
      <ApplyList ref="applyList1Id" />
    </a-tab-pane>
    <a-tab-pane key="2" tab="已培训" force-render>
      <ApplyList ref="applyList2Id" />
    </a-tab-pane>
  </a-tabs>
</template>

<script>
import ApplyList from './applyList'
export default {
  name: 'interview',
  components: { ApplyList },
  data() {
    return {
      tabIndex: "1",
    }
  },
  watch: {
    $route(data) {   //data为当前路由信息
      // console.log("route2:")
      // console.log(data)
      // this.getRouter(data.name)
      this.tabIndex = "1"
    }
  },
  mounted() {
    this.$refs.applyList1Id.setStatus(1)
  },
  methods: {
    callback(key) {
      if (key == '1') {
        this.$refs.applyList1Id.setStatus(1)
      } else {
        this.$refs.applyList2Id.setStatus(2)
      }

    },
  }
}
</script>

<style lang="less" scoped>
// .page-menu-tabs {
//   background-color: #fff;
//   padding: 0 24px;
// }

// .search-content {
//   margin-top: 0;
// }
/deep/.ant-tabs-bar {
  background-color: #fff;
}
</style>